package com.darren.euc.service;

import java.util.List;

import com.darren.euc.entity.PageBean;
import com.darren.euc.entity.User;

import net.sf.json.JSONObject;

public interface UserService{
    
	public User save(User user);
    
	public User update(User user);
	   
	public void deleteById(Integer id);
	
	public List<User> getAll();
    
    public User getUserByUserName(String userName);
    
    public User getUserById(Integer id);
    
    public List<User> getUserByMobile(String mobile);
    
    public PageBean queryForPageBySQL(String sql, Integer pageSize, Integer currentPage,Object... objs);
	
    public PageBean queryForPageUseHQLByUserName(String userName,Integer pageSize, Integer currentPage);
        
    public PageBean queryForPageUseHQL(JSONObject requestJson,Integer pageSize, Integer currentPage);
    
    
    public boolean IsAdmin(Integer userId,Integer functionId);
    
    public List<User> getAdminListByFunctionId(String functionId);
    
    public List<User> getUserListByFunctionId(String functionId,Integer userId);
	
}